package Demo17;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 洪汤泽大帅哥
 * Date: 2024-12-20
 * Time: 15:09
 */
import java.util.Scanner;
public class Main {
    public static void main(String[] args) {
        int n;
        Scanner scan=new Scanner(System.in);
        n=scan.nextInt();
        SingleTest st1=SingleTest.getInstance(n);
        SingleTest st2=SingleTest.getInstance(n);
        st1.Oper();
        System.out.println("当前的储量是："+st2.getBucket());
    }
}
class SingleTest{
    private int bucket = 0;
    private static SingleTest m;
    SingleTest(){}

    public SingleTest(int bucket) {
        this.bucket = bucket;
    }
    public static SingleTest getInstance(int n){
        if (m==null){
            m = new SingleTest();
            m.bucket = n;
        }
        return m;
    }
    public void Oper(){
        if (this.bucket<100){
            this.bucket++;
        }
        else if (this.bucket>=100){
            this.bucket--;
        }
    }

    public int getBucket() {
        return bucket;
    }
}

